﻿namespace Softserve.Pottery.Infrastructure
{
    using System;

    /// <summary>
    /// Provides transaction functionality
    /// </summary>
    public interface ITransaction : IDisposable
    {
        /// <summary>
        /// Complete transaction with approve all changes
        /// </summary>
        void Commit();
        /// <summary>
        /// Rolled back transaction
        /// </summary>
        void Rollback();
        /// <summary>
        /// Provides extended information about wrapper transaction object
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        T GetTransactionInfo<T>();
    }
}
